function loginApi(data) {
  return $axios({
    'url': '/volunteer/login',
    'method': 'post',
    data
  })
}

function RegisOrGrant(data) {
  return $axios({
    'url': '/volunteer/regisOrGrant',
    'method': 'post',
    data
  })
}

function logoutApi(){
  return $axios({
    'url': '/volunteer/logout',
    'method': 'post',
  })
}

function UserLogin(data) {
  return $axios({
    'url': '/user/login',
    'method': 'post',
    data
  })
}

function getVolunteerList (params) {
  return $axios({
    url: '/volunteer/page',
    method: 'get',
    params
  })
}

function getVolunteer(id) {
  return $axios({
    url: `/volunteer/${id}`,
    method: 'get'
  })
}


function modifyInfo (params) {
  return $axios({
    url: '/volunteer/modify',
    method: 'put',
    data: {...params}
  })
}
function addTime (params) {
  return $axios({
    url: '/volunteer/addTime',
    method: 'put',
    data: {...params}
  })
}

// 修改页面反查详情接口
function deleteVolunteer (id) {
  return $axios({
    url: `/volunteer/${id}`,
    method: 'delete'
  })
}


